/*

test the kingdom card function in dominion.c

fill 10 random ints to the array k[10] in kingdom card function and check if it match the result...

*/


#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "rngs.h"

// set NOISY_TEST to 0 to remove printfs from output
#define NOISY_TEST 1



int main() {

  int i=1;
  int seed = 1000;
  int numPlayer = 2;
  int r;
    int k[10] = {adventurer, council_room, feast, gardens, mine
		 , remodel, smithy, village, baron, great_hall};
    struct gameState G;



    memset(&G, 23, sizeof(struct gameState));   
      r = initializeGame(numPlayer, k, seed, &G);
    



	int start = 0;
	while (start<10){
	  printf("ki is %d\n",k[start]);
	  printf("kc is %d\n",kingdomCards(adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall)[start]);
	  if(k[start]==kingdomCards(adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall)[start])
	    start ++;
	  else
	    i=2;
	}



	if(i==1)

	  {
	    printf("All tests passed!\n");
	  }else{
	  printf("test failed");	
	}
	return 0;
}
